//心跳命令
MDM_KN_COMMAND = 0
SUB_KN_CLIENT_HEART = 3;
//=======================================主消息1===========================================
MDM_GP_LOGON = 1;    //广场登录

//登录模式  
SUB_GP_LOGON_GAMEID = 1;                        //帐号登录
SUB_GP_LOGON_ACCOUNTS = 2;                      //I D 登录
SUB_GP_REGISTER_ACCOUNTS = 3;                   //注册帐号

//登录结果
SUB_GP_LOGON_SUCCESS = 100;                     //登录成功


//登录
CMD_GP_LogonAccounts = cc.Class({
    ctor :function() {
        this.szAccounts="";                    
        this.szPassword="";                     //登录密码

        this.len_szPassword=LEN_MD5*cc.TCHAR_SIZE;
        this.len_szAccounts=LEN_ACCOUNTS*cc.TCHAR_SIZE;
    },
});

//登录成功
CMD_GP_LogonResponse = cc.Class({
    ctor :function() {
        this.lResultCode = 0;                       //错误码

        this.dwUserID = 0;							//用户 I D
        this.dwGameID = 0;							//游戏 I D
    
        //用户成绩
        this.llUserScore = 0;						//用户金币
        this.llUserIngot = 0;						//用户房卡
        this.dUserBeans = 0;						//用户点券

        //用户信息
        this.cbGender = 0;							//用户性别
        this.cbMoorMachine = 0;						//锁定机器
        this.szAccounts = "";		                //登录帐号
        this.szNickName = "";	                    //用户昵称
        this.szClientIP = "";                       //ip地址

        this.len_szAccounts = LEN_ACCOUNTS*cc.TCHAR_SIZE;
        this.len_szNickName = LEN_NICKNAME*cc.TCHAR_SIZE;
        this.len_szClientIP = LEN_IP*cc.TCHAR_SIZE;

        //配置信息
        this.cbShowServerStatus = 0;				//银行使能标识
    },
});

//=================================主消息2=============================================
MDM_GP_SERVER_LIST = 2;                             //列表信息

SUB_GP_GET_LIST_RES = 1;                            //游戏列表请求
SUB_GP_GET_LIST_REQ = 101;                          //有消息列表返回           
					           
tagGameServer = cc.Class({
    ctor :function() {
        this.wKindID = 0;
    }
});


//大协议
MDM_GP_GET_SERVER = 7;

SUB_GP_CREATE_ROOM = 3;
SUB_GP_FAILED = 100;                    	//创建房间失败返回1
SUB_GP_CLUB_DISS_SUC = 105;                 //创建房间失败返回2
SUB_GP_CREATE_SUCCESS = 102;                //创建房间成功返回
//创建新桌
CMD_GP_C_CreateRoom = cc.Class({
    ctor :function () {
        this.dwID = 0;                  //游戏规则ID(私人房间传0)
        this.dwUserID=0;                //玩家ID
        this.dwBaseRate=0;              //游戏底分 0.5 1 2 3 5 10 20 30
        this.wKindID=0;                 //游戏ID
        this.dwRules=0;                 //游戏规则
        this.dwClubID=0;                //大圈ID(私人房间传0)
        this.dwMyClubID=0;              //本圈ID(私人房间传0)
        this.szRoomName=0;              //玩法名称 

        this.len_szRoomName = 16*cc.TCHAR_SIZE;
    },
});

//创建房间失败返回2
CMD_GP_S_Failed = cc.Class({
    ctor :function () {
        this._name="CMD_GP_S_Failed";
        this.byRes = 0;								//0未找到房间 1房间已满 16俱乐部已经关闭
    },
});


TagServerInfo = cc.Class({
    ctor:function(){
        this._name="TagServerInfo";
        this.wKindID = 0;                   //游戏类型
        this.wServerPort = 0;               //房间端口
        this.szServerAddr = 0;              //房间地址

        this.len_szServerAddr = 32*cc.TCHAR_SIZE;
    }
});

//创建房间成功返回
CMD_GP_S_ReturnRoom = cc.Class({
    ctor :function () {
        this._name="CMD_GP_S_ReturnRoom";
        this.TagServerInfo = new TagServerInfo();
        this.dwRoomID=0;                //房间ID
        this.dwClubID=0;                //圈子ID(私人房间,则为0)
    },
});

//====================游戏类===========================
MDM_GR_LOGON = 1;
SUB_GR_LOGON_USERID = 1;

CMD_GR_LogonUserID = cc.Class({
    ctor:function(){
        this._name="CMD_GR_LogonUserID";
        this.dwUserID = 0;                //房间ID
        this.dwClubID = 0;                //圈子ID(私人
        this.szPassword =0;
        this.wKindID = 0;
        
        this.len_szPassword = 32*cc.TCHAR_SIZE;
    }
});